package com.demo2;

public class StringBuilderDemo2 {
    public static void main(String[] args) {
        //1.创建对象
        StringBuilder builder = new StringBuilder();
        //2.添加字符串
        builder.append("aaa");
        builder.append("bbb");
        builder.append("ccc");
        builder.append("ddd");
        System.out.println(builder);
        //3.把StringBuilder变回字符串
        String string = builder.toString();
        System.out.println(string);
    }
}
